package com.example.demo.exception;

public enum RespCode {

    REGISTER_SUCCESS(200, "注册成功"),

    PARAMETER_ERROR(5001, "参数异常"),

    REGISTER_ERROR_USERNAME(5002, "登录失败,用户名不存在"),

    REGISTER_ERROR_PASSWORD(5002, "登录失败,密码错误"),

    REGISTER_ERROR_USER_EXIT(5002, "注册失败,用户名已经存在"),

    REGISTER_ERROR_TOKEN_EXIT(5004, "token不能为空"),

    REGISTER_ERROR_TOKEN(5004, "token错误"),

    REGISTER_ERROR(5003, "注册失败");

    /**
     * 值
     */
    private final Integer value;

    /**
     * 名称
     */
    private final String name;

    RespCode(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }
}
